<?php

class Controller_Board extends FLEA_Controller_Action
{
    var $ext2;
	var $jsCfgData;
	/**
     * 构造函数
     *
     * @return Controller_Login
     */
    function Controller_Board() {
        
		$this->ext2 =& FLEA::getSingleton('Model_Ext2');

    }
    /**
     * 显示平台页面
     *
     */
    function actionIndex() {
		$this->jsCfgData =& FLEA::getSingleton('Model_JsCfgData');

        $dispatcher =& $this->_getDispatcher();
        $user = $dispatcher->getUser();

		$terminal = & FLEA::getSingleton('Table_Terminals');
		if ($user['terminal_id'] != null){
			$term = $terminal->find('terminal_id = '.$user['terminal_id']);
			if(false != $term) {
				$user['terminal_name'] = $term['name'];
			}
		}else{
			$user['terminal_name'] = '管理后台';
		}

		$this->jsCfgData->Add('UserMessage',$user);
		include(APP_DIR . '/BoardIndex.php');
			
    }    
}    
?>